package com.ux.util
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;

	
	/**
	 * @author winnie
	 */	
	public class VectorUtil
	{
		
		public static function sortLastNameCompare( a:Object, b:Object ):Number
		{
			var _a : int = int( a.name.substr( a.name.length-1 ) );
			var _b : int = int( b.name.substr( b.name.length-1 ) );
			
			if( _a < _b ) return -1;
			else if( _a > _b ) return 1;
			else return 0;
		}
		
		
		public static function viewMovieClipName( _vec:Vector.<MovieClip> ):void
		{
			var len:int = _vec.length;
			for (var i:int = 0; i < len; i++) 
			{
				trace(" ==> VectorUtil viewVecNameList : [ " + i + " ]  => " + _vec[i].name );
			}
		}
		
		/**
		 * @param obj 체크할 컨텐츠
		 * @param _vec : 리스트 벡터.
		 * @return 
		 */		
		public static function contains( obj : Object, _vec:Object ):Boolean
		{
			var len:int = _vec.length;
			for (var i:int = 0; i < len; i++) 
			{
				if( obj === _vec[ i ] ) return true;
			}
			
			return false;
		}
		
		
		
		public function VectorUtil()
		{
		}
	}
}